#define _CRT_SECURE_NO_WARNINGS

#include "ListNode.h"

int main()
{
	ListNode** head = malloc(sizeof(ListNode*));
	if (NULL == head)
	{
		printf("Failed to create a head pointer:malloc failed.\n");
		return 1;
	}
	*head = CreateNode(1);
	AppendNode(head, 2);
	for (int i = 3; i <= 10; i++)
	{
		AppendNode(head, i);
	}
	AppendNode(head, 1);
	AppendNode(head, 1);
	AppendNode(head, 1);
	PrintList(*head);
	DeleteFirstMatchNode(head, 1);
	PrintList(*head);
	DeleteAllMatchNode(head, 1);
	PrintList(*head);
	DestroyList(head);
	PrintList(*head);


	return 0;
}